<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增项目列表')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-project-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目名称：</label>
                <div class="col-sm-8">
                    <input name="projectName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目描述：</label>
                <div class="col-sm-8">
                    <textarea name="projectDesc" class="form-control" rows="5" required placeholder="请输填写项目描述……"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">actuator地址：</label>
                <div class="col-sm-8">
                    <input name="manageUrl" class="form-control" type="text" required>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 默认地址为：http://ip:port/actuator</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目状态：</label>
                <div class="col-sm-8">
                    <select name="projectStatus" class="form-control m-b" required>
                        <option value="1">启用</option>
                        <option value="0">禁用</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "project"
        $("#form-project-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-project-add').serialize());
            }
        }
    </script>
</body>
</html>